<script lang="ts" setup>
import {ref} from 'vue'
import {useRoute} from 'vue-router'


const route = useRoute()

function show() {
  console.log(route.params.id)
  console.log(route.query.name)
}
</script>

<template>
  <h3>设置中心</h3>
  id{{ $route.params.id }}

  <button @click="show">show</button>
  <button @click="console.log($route.params.id)">show</button>

  <p>欢迎:{{ $route.query.name }}</p>
</template>

<style scoped>

</style>
